Ext.define('Usws.controller.VideoAuthLog', {
    extend: 'Ext.app.Controller',
    stores:['VideoAuthLog'],
    
    refs: [
   		   {
               ref: 'contentPanel',
               selector: 'contentPanel'
           }
    ],

    init: function() {
        this.control({
            'VideoAuthLog-Grid': {
                add: this.loadVideoAuthLog
            }
        });
    },
    
    loadVideoAuthLog:function(obj, component, index, eOpts){
    	var videoAuthLogStore = this.getVideoAuthLogStore();
    	videoAuthLogStore.on('beforeload', function (store, options) {
          var new_params = { name: 'fengyong'/* Ext.get('search').getValue()*/ };
          Ext.apply(store.proxy.extraParams, new_params);
        });
    	videoAuthLogStore.load();
    },

    reloadVideoAuthLog:function() {
    	var contentPanel = this.getContentPanel();
    	var videoAuthLogStore = this.getVideoAuthLogStore();
    	contentPanel.removeAll(true);
    	videoAuthLogStore.load();
        contentPanel.add(Ext.widget('VideoAuthLog-Grid'));
        if (contentPanel.floating) {
       	 contentPanel.show();
         }
        contentPanel.setDisabled(false);
    }

});